from comtypes.client import CreateObject, ShowEvents, PumpEvents

ie = CreateObject("InternetExplorer.Application")
ie.Visible = True
print ie
connection = ShowEvents(ie)
print connection
PumpEvents(30)
